package steven.sdc.appPoker.Adapter;

import java.util.ArrayList;

import com.amurani.slidingmenu.R;

import steven.sdc.appPoker.Items.ItemBangDiem;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

public class AdapterBangDiem extends ArrayAdapter<ItemBangDiem>{
	private ArrayList<ItemBangDiem> Item;
	int layoutId;
	Context frag;
	LayoutInflater inflater;
	

	public AdapterBangDiem(Context frag, int layoutId,ArrayList<ItemBangDiem> list) {
		super(frag, R.layout.list_item_bangdiem, list);
		this.frag=frag;
		this.layoutId=layoutId;
		this.Item=list;
		inflater=(LayoutInflater)getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
		
		
		// TODO Auto-generated constructor stub
	}


	@Override
	public View getView(int position, View view, ViewGroup parent) {
		view=inflater.inflate(R.layout.list_item_bangdiem, null);
		TextView txt_van=(TextView)view.findViewById(R.id.list_txt_van);
		TextView txt_nguoi1=(TextView)view.findViewById(R.id.list_txt_nguoi1);
		TextView txt_nguoi2=(TextView)view.findViewById(R.id.list_txt_nguoi2);
		TextView txt_nguoi3=(TextView)view.findViewById(R.id.list_txt_nguoi3);
		TextView txt_nguoi4=(TextView)view.findViewById(R.id.list_txt_nguoi4);
		ItemBangDiem item=Item.get(position);
		txt_van.setText(""+item.van);
		txt_nguoi1.setText(""+item.nguoi_1);
		txt_nguoi2.setText(""+item.nguoi_2);
		txt_nguoi3.setText(""+item.nguoi_3);
		txt_nguoi4.setText(""+item.nguoi_4);
		// TODO Auto-generated method stub
		return view;
	}
	

}
